#ifndef __DSTH_TYPE_H__
#define __DSTH_TYPE_H__

#if defined(_WIN32) || defined(_WIN64)
    #define IS_WINDOWS
    
    #ifndef _WIN32_WINNT
    #define _WIN32_WINNT 0x0500
    #endif

	typedef char int8_t;
	typedef unsigned char uint8_t;
	typedef short int16_t;
	typedef unsigned short uint16_t;
	typedef int int32_t;
	typedef unsigned int uint32_t;
	typedef __int64 int64_t;
	typedef unsigned __int64 uint64_t;

    #define PRId8     "hhd"
    #define PRId16    "hd"
    #define PRId32    "ld"
    #define PRId64    "lld"
    #define snprintf  _snprintf

    #define pthread_t HANDLE
    #define pid_t     unsigned int
    #ifdef FD_SIZE 
    #undef FD_SIZE 
    #define FD_SIZE 2048
    #endif
    #include <WinSock2.h>
    #include <Windows.h>
    #ifdef _MSC_VER
    #pragma warning(disable:4996) // for 'this' pointer used in base member initializer list
    #endif
#else // FreeBSD/FreeBSD64/Linux
	#include <stdint.h>
    #include <errno.h>
    #include <string.h>
    #define __stdcall
#endif

#endif // __DSTH_TYPE_H__
